package com.cci.kangdao.controller;

import com.cci.kangdao.dao.model.ApprovalGoingOutT;
import com.cci.kangdao.dto.BaseResponse;
import com.cci.kangdao.dto.request.ApprovalGoingOutTDto;
import com.cci.kangdao.service.ApprovalGoingOutTService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @description:
 * @author: joe
 * @company: CTY
 * @since: 2023/2/28 10:32
 * @version: V1.0
 **/
@RestController
@RequestMapping("goingOut")
public class ApprovalGoingOutTController {
    @Autowired
    private ApprovalGoingOutTService approvalGoingOutTService;

    @RequestMapping(value = "save.aspx", method = RequestMethod.POST)
    public BaseResponse save(@RequestBody ApprovalGoingOutTDto approvalGoingOutTDto) {
        return approvalGoingOutTService.save(approvalGoingOutTDto);
    }

    @RequestMapping(value = "getListByOrderId.aspx", method = RequestMethod.GET)
    public BaseResponse getListByOrderId(Long orderId) {
        BaseResponse listByOrderId = approvalGoingOutTService.getListByOrderId(orderId);
        return listByOrderId;
    }
}
